from pathlib import Path

# 假设你的项目根目录就是 main.py 所在目录
BASE_DIR = Path(__file__).resolve().parent.parent
TEST_BASE_DIR = Path(__file__).resolve().parent.parent.parent

def resource_path(relative_path: str) -> str:
    """
    Convert relative path from project root to absolute path.
    """
    return str(BASE_DIR / relative_path)

def test_resource_path(relative_path: str) -> str:
    """
    Convert relative path from project root to absolute path.
    """
    return str(TEST_BASE_DIR / relative_path)